package com.example.providerclient;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by tangjiangxu on 9/4/17.
 */

public class Book implements Parcelable{
    public  int index;
    public String name;

    public Book(int index, String name) {
        this.index = index;
        this.name = name;
    }

    protected Book(Parcel in) {
    }

    protected Book() {
    }

    public static final Creator<Book> CREATOR = new Creator<Book>() {
        @Override
        public Book createFromParcel(Parcel in) {
            return new Book(in);
        }

        @Override
        public Book[] newArray(int size) {
            return new Book[size];
        }
    };

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
    }

    @Override
    public String toString() {
        return "Book{" +
                "index=" + index +
                ", name='" + name + '\'' +
                '}';
    }
}
